
function GMessenger(users, args) {
    this.users     = users;
    this.args     = args;
/*    args = args || new Object;
    this.url = args.url || ".";
    this.args = {
        defLang: args.lang, defOptions: args.options,
        spellDlg: args.spellDlg || { width: 440, height: 265 },
        optDlg: args.optDlg || { width: 330, height: 275 },
        userDicDlg: args.userDicDlg || { width: 270, height: 350 }
    };*/
}

/*Speller.IGNORE_UPPERCASE = 0x0001;
Speller.IGNORE_DIGITS    = 0x0002;
Speller.IGNORE_URLS      = 0x0004;
Speller.FIND_REPEAT      = 0x0008;
Speller.IGNORE_LATIN     = 0x0010;
Speller.FLAG_LATIN       = 0x0080;*/


GMessenger.prototype.loadMessages = function(params) {
    $(this.args.dialog).append(this.users[this.args.user_id].name + ': ' + text + '<br>');
/*    google.language.translate(text, "en", "ru", function(result) {
        $('#dialog1').append('En: ' + result.translation + '<br>');
    });*/
}


GMessenger.prototype.say = function(text) {
    $(this.args.dialog).append(this.users[this.args.user_id].name + ': ' + text + '<br>');
/*    google.language.translate(text, "en", "ru", function(result) {
        $('#dialog1').append('En: ' + result.translation + '<br>');
    });*/
}

function parse_response(responseText) { // response.responseText
    var data = eval('(' + responseText + ')');
}
